Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Supplier] Updating the scaffolded Claim type #151

Merged
merged 55 commits into from
Nov 17, 2023

Conversation

Olshansk
Copy link
Member

@Olshansk Olshansk commented Nov 7, 2023

IMPORTANT: DO NOT REVIEW THE _test.gofiles yet. they're not ready

Summary

Human Summary

  • Removed Claims from the genesis file
  • Indexing Claims by height & address in addition to its primary composite key upon insertion
  • Added the ability to query claims by session-id, session-end-height and supplier address
  • Added some claim makefile helpers to create and view them

Issue

Issue:

Type of change

Select one or more:

  • New feature, functionality or library
  • Bug fix
  • Code health or cleanup
  • Documentation
  • Other (specify)

Testing

  • Run all unit tests: make go_develop_and_test
  • Verify Localnet manually: See the instructions [here](TODO: add link to instructions)

Sanity Checklist

  • I have tested my changes using the available tooling
  • I have performed a self-review of my own code
  • I have commented my code, updated documentation and left TODOs throughout the codebase

@Olshansk Olshansk changed the title [Supplier] Updating the scaffolded claim [Supplier] Updating the scaffolded Claim type Nov 7, 2023
Olshansk and others added 16 commits November 6, 2023 16:43
* chore: add `TxClient` interface

* chore: add option support to `ReplayObservable`

* feat: add `txClient` implementation

* test: `txClient`

* test: tx client integration

* chore: s/tx/transaction/g

* chore: update pkg README.md template

* wip: client pkg README

* docs: fix client pkg godoc comment

* fix: flakey test

* chore: dial back godoc comments 😅

* chore: revise (and move to godoc.go) `testblock` & `testeventsquery` pkg godoc comment

* chore: update go.mod

* chore: refactor & condense godoc comments

* chore: fix import paths post-update

* chore: review feedback improvements

* docs: update client README.md

* docs: add `tx query` usage association between `txContext` & `Blockchain`

* docs: add TOC

* chore: review feedback improvements

Co-authored-by: Daniel Olshansky <[email protected]>

* docs: improve godoc comments & client README.md

---------

Co-authored-by: Daniel Olshansky <[email protected]>
* chore: add `TxClient` interface

* chore: add option support to `ReplayObservable`

* feat: add `txClient` implementation

* test: `txClient`

* test: tx client integration

* chore: s/tx/transaction/g

* chore: update pkg README.md template

* wip: client pkg README

* docs: fix client pkg godoc comment

* refactor: consolidate keyring errors & helpers

* refactor: keyring test helpers

* fix: flakey test

* chore: dial back godoc comments 😅

* chore: revise (and move to godoc.go) `testblock` & `testeventsquery` pkg godoc comment

* chore: update go.mod

* chore: refactor & condense godoc comments

* chore: fix import paths post-update
* chore: add `TxClient` interface

* chore: add option support to `ReplayObservable`

* feat: add `txClient` implementation

* test: `txClient`

* test: tx client integration

* chore: s/tx/transaction/g

* chore: update pkg README.md template

* wip: client pkg README

* docs: fix client pkg godoc comment

* refactor: consolidate keyring errors & helpers

* refactor: keyring test helpers

* fix: flakey test

* chore: dial back godoc comments 😅

* chore: add `SupplierClient` interface

* feat: add supplier client implementation

* test:  supplier test helpers

* test: supplier client tests

* test: supplier client integration test

* chore: update go.mod

* trigger CI

* chore: revise (and move to godoc.go) `testblock` & `testeventsquery` pkg godoc comment

* chore: update go.mod

* chore: refactor & condense godoc comments

* chore: fix import paths post-update

* chore: add godoc comment
…ocs (#153)

* refactor: move /internal pkgs to /testutil

* chore: cleanup
@Olshansk Olshansk added the supplier Changes related to the Supplier actor label Nov 7, 2023
@Olshansk Olshansk added this to the Shannon TestNet milestone Nov 7, 2023
@Olshansk Olshansk self-assigned this Nov 7, 2023
Makefile Outdated Show resolved Hide resolved
x/supplier/client/cli/query_claim_test.go Outdated Show resolved Hide resolved
x/supplier/client/cli/query_claim_test.go Outdated Show resolved Hide resolved
@Olshansk
Copy link
Member Author

@bryanchriswhite @h5law Note that this is still a draft because I left 4 TODO_IN_THIS_PR PR for myself. However, please take a look at the rest and review when you have a chance.

@Olshansk Olshansk marked this pull request as ready for review November 16, 2023 21:56
@Olshansk Olshansk requested a review from red-0ne November 16, 2023 21:56
@Olshansk
Copy link
Member Author

I still have a few finishing touches on this PR but marking it as ready for review in parallel

var resp types.QueryAllClaimsResponse
require.NoError(t, net.Config.Codec.UnmarshalJSON(out.Bytes(), &resp))

require.Equal(t, numSessions, int(resp.Pagination.Total))
// require.ElementsMatch(t,
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

is this causing issues?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It's not, but ty for the reminder. Just added these back in!

x/supplier/keeper/claim.go Outdated Show resolved Hide resolved
Copy link
Contributor

@h5law h5law left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looking good! Things are shaping up nicely, once the outstanding test issues are done this will be great to finally get in

@Olshansk Olshansk merged commit 0338cc2 into main Nov 17, 2023
8 checks passed
@Olshansk Olshansk deleted the issues/140/update_scaffold_claim branch November 17, 2023 19:49
bryanchriswhite added a commit that referenced this pull request Nov 20, 2023
* pokt/main:
  [Off-chain, Testing] test: protocol pkg (part 1) (#192)
  [Supplier] Updating the scaffolded `Claim` type (#151)
@bryanchriswhite bryanchriswhite linked an issue Dec 5, 2023 that may be closed by this pull request
8 tasks
okdas pushed a commit that referenced this pull request Nov 14, 2024
- Removed `Claim`s from the genesis file
- Indexing Claims by height & address in addition to its primary composite key upon insertion
- Added the ability to query claims by `session-id`, `session-end-height` and `supplier address`
- Added some `claim` makefile helpers to create and view them

---------

Co-authored-by: Bryan White <[email protected]>
Co-authored-by: harry <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
supplier Changes related to the Supplier actor
Projects
Status: ✅ Done
Development

Successfully merging this pull request may close these issues.

[Protocol] MVP implementation off the on-chain CreateClaim message handling
3 participants